package com.hospital.ssm.service.serviceimpl;

import com.hospital.ssm.mapper.DoctorMapper;
import com.hospital.ssm.model.Doctor;
import com.hospital.ssm.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DoctorServiceimpl implements DoctorService {
    @Autowired
    private DoctorMapper doctorMapper;
    @Override
    public List<Doctor> getAll(Integer id) throws Exception {
        return doctorMapper.getAll(id);
    }

    @Override
    public int delete(Integer id) throws Exception {
        return doctorMapper.delete(id);
    }

    @Override
    public int insert(Doctor doctor) throws Exception {
        return doctorMapper.insert(doctor);
    }

    @Override
    public int update(Doctor doctor) throws Exception {
        return doctorMapper.update(doctor);
    }

    @Override
    public int updatedStatusu(Integer id) throws Exception {
        return doctorMapper.updatedStatusu(id);
    }

    @Override
    public int updatedStatusn(Integer id) throws Exception {
        return doctorMapper.updatedStatusn(id);
    }
}
